package org.wat.wcy.isi.mmazur.bp.model.utils;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.wat.wcy.isi.mmazur.bp.io.model.transport.KeyValuePair;

public class ModelUtil {
	public static List<KeyValuePair> converToKeyValue(final Map<String, String> map) {
		if (map == null) {
			return null;
		}
		List<KeyValuePair> result = new ArrayList<KeyValuePair> ();
		for (String key : map.keySet()) {
			String value = map.get(key);
			result.add(new KeyValuePair(key, value));
		}
		return result;
	}
}
